
<template>
  <div id="card_write_off">
		<magic-header v-if="!isWxPublic" titleName="卡券核销"></magic-header>
    <section>
        <i class="iconfont icon-chenggong"></i>
        <p>核销成功</p>
    </section>
    <section>
      <div class="inputHand">
        <input @click="go('card_write_off')" type="button" value="返回继续核销">
      </div>
    </section>
  </div>
</template>
<script>
import magicHeader from "components/magicHeader";
import cardWriteOff from "services/vfhz/card_write_off";
import wx from "weixin-js-sdk";
export default {
  name:'card_write_off',
  data() {
    return {
      userId:'',
      shopId:'',
      isAdmin:false,
      isWxPublic:false
    };
  },
  created() {
    if (this.$.env === "wxPublic") {
      this.isWxPublic = true;
    }
    this.userId = this.$.userId;
    this.shopId = this.$.shopId;
    if(this.userId){
      cardWriteOff.bind(this)({
        methodName : "QueryRoleHasAuthority", 
        shopId:this.shopId,
        userId:this.userId,
        keywords : ["admin:activity"]
      },res=>{
        console.log(res);
          this.isAdmin = res.isAdmin
      },err=>{
        console.log(err);
        this.$.toast(err)
      })
    }
  },
  methods: {
    go(params){
        this.$router.push({
          name:params
        })
    }
  },
  components: {
    magicHeader
  }
};
</script>
<style scoped="scoped" lang="scss">
  #card_write_off{
      text-align:center;
      font-size: 14px;
      i{
        display: inline-block;
        font-size: 100px;
        margin-top: 40px;
        color: #00cc33;
      }
      p{
          margin-top: 10px;
      }
    .inputHand{
      margin-top: 140px;
      input{
        width: 80vw;
        height: 46px;
        line-height: 46px;
        border-radius: 5px;
        border: none;
        background-color: #FB8713;
        color: #fff;
        font-size: 14px;
      }
    }
  }
</style>